<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="../css/weui.css"/>
    <link rel="stylesheet" href="../css/weuix.css"/>

    <script src="../js/zepto.min.js"></script>
    <script>

        $(function(){
           var $progress = $('.js_progress'),
                $btnUpload = $('#btnUpload');
            var progress = 0;

            function next() {
                if(progress > 100){
                    progress = 0;
                    $btnUpload.removeClass('weui-btn_disabled');
                    return;
                }
                $progress.css({width: progress + '%'});
                progress = ++progress;
                setTimeout(next, 20);
            }

            $btnUpload.on('click', function(){
              if ($btnUpload.hasClass('weui-btn_disabled')) return;

                $btnUpload.addClass('weui-btn_disabled');
                next();
            });

        });
    </script>
</head>

<body ontouchstart>
<div class="page-hd">
    <h1 class="page-hd-title">
        进度条
    </h1>
    <p class="page-hd-desc"></p>
</div>

<div class="page-bd-15">
    <div class="weui-progress">
        <div class="weui-progress__bar">
            <div class="weui-progress__inner-bar js_progress" style="width: 0%;"></div>
        </div>
        <a href="javascript:;" class="weui-progress__opr">
            <i class="weui-icon-cancel"></i>
        </a>
    </div>
    <br>
    <div class="weui-progress">
        <div class="weui-progress__bar">
            <div class="weui-progress__inner-bar js_progress" style="width: 50%;"></div>
        </div>
        <a href="javascript:;" class="weui-progress__opr">
            <i class="weui-icon-cancel"></i>
        </a>
    </div>
    <br>
    <div class="weui-progress">
        <div class="weui-progress__bar">
            <div class="weui-progress__inner-bar js_progress" style="width: 75%;"></div>
        </div>
        <a href="javascript:;" class="weui-progress__opr">
            <i class="weui-icon-cancel"></i>
        </a>
    </div>
    <div class="weui-btn-area">
        <a href="javascript:;" class="weui-btn weui-btn_primary" id="btnUpload">上传</a>
    </div>
</div>


<br>
<br>
<div class="weui-footer weui-footer_fixed-bottom">
    <p class="weui-footer__links">
        <a href="../index.html" class="weui-footer__link">WeUI首页</a>
    </p>
    <p class="weui-footer__text">Copyright &copy; Yoby</p>
</div>
</body>
</html>